@use '../styles/variables' as *;

.app-layout {
  min-height: 100vh;
  background: $background-color-base;
}

.app-header {
  background: $background-color;
  box-shadow: $box-shadow-base;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: $z-index-sticky;
  border-bottom: 1px solid $border-color-light;
}

.header-container {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 $spacing-lg;
  height: 64px;
}

.main-menu {
  flex: 1;
  
  .ant-menu-item,
  .ant-menu-submenu-title {
    height: 64px;
    line-height: 64px;
    border-radius: $border-radius-base;
    margin: 0 $spacing-xs;
    transition: $transition-base;
    
    &:hover {
      background-color: rgba(24, 144, 255, 0.1);
      color: $primary-color;
    }
    
    &.ant-menu-item-selected {
      background-color: rgba(24, 144, 255, 0.1);
      color: $primary-color;
      font-weight: $font-weight-medium;
    }
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: $spacing-md;
}

.search-box {
  display: flex;
  align-items: center;
  
  .ant-input {
    border-radius: $border-radius-xxl;
    border: 1px solid $border-color;
    transition: $transition-base;
    
    &:focus,
    &:hover {
      border-color: $primary-color;
      box-shadow: $box-shadow-focus;
    }
  }
}

.user-actions {
  display: flex;
  align-items: center;
  gap: $spacing-sm;
  
  .ant-avatar {
    border: 2px solid $border-color-light;
    transition: $transition-base;
    
    &:hover {
      border-color: $primary-color;
      transform: scale(1.05);
    }
  }
  
  .ant-btn {
    border-radius: $border-radius-base;
    transition: $transition-base;
    
    &:hover {
      transform: translateY(-1px);
    }
  }
}

.app-content {
  background: $background-color-base;
  min-height: calc(100vh - 200px);
  padding: $spacing-lg;
}

.app-footer {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: $background-color;
  text-align: center;
  padding: 0;
  margin-top: auto;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  p, a, span {
    color: $background-color !important;
  }
  
  .footer-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: $transition-base;
    
    &:hover {
      color: $background-color !important;
      text-decoration: underline;
    }
  }
  
  .footer-link-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 $spacing-sm;
  }
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 $spacing-lg;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: $spacing-lg;
}

.footer-info {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
}

.footer-social {
  display: flex;
  justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    padding: 0 16px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .search-box .ant-input {
    width: 150px !important;
  }
  
  .app-content {
    padding: 16px;
  }
}

@media (max-width: 576px) {
  .header-container {
    flex-direction: column;
    height: auto;
    padding: 8px 16px;
  }
  
  .main-menu {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .search-box .ant-input {
    width: 100px !important;
  }
}